package com.guigu.eduservice.service;

import com.github.pagehelper.PageInfo;
import com.guigu.common.utils.R;
import com.guigu.eduservice.entity.Equipment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guigu.eduservice.vo.AuditVo;
import com.guigu.eduservice.vo.EqVo;
import com.guigu.eduservice.vo.EquipmentVo;
import com.guigu.eduservice.vo.OrderVo;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 * 设备表（存储卖家发布的二手机械信息） 服务类
 * </p>
 *
 * @author janecraft
 * @since 2025-09-27
 */
public interface EquipmentService extends IService<Equipment> {
    PageInfo<Equipment> page(Integer pageNum, Integer pageSize , EqVo vo);

    /**
     * 设备分页
     * @param pageNum 页码
     * @param pageSize 页大小
     * @return 设备列表
     */
    PageInfo<Equipment> EquipmentPage(Integer pageNum, Integer pageSize, EqVo vo);

    List<Equipment> getAll(Long typeId);
    //根据设备ID查询设备详情，图片等也在里面
    Equipment getByIdImageV(Long id);
    Equipment addImageV(Equipment equipment);

    boolean audit(Long id, AuditVo auditVo);

//    我要买
    List<Equipment> queryEquipment(@RequestBody EquipmentVo vo);
    //根据用户ID查询设备
    List<Equipment> getEqByUserId(Long userId);

    Equipment queryEquipmentAndImageAndType2(Long equipmentId);

    int getTodayDeviceCount();

    int shelf(int equipmentId, EqVo vo);
}
